package com.example.demo.task;

import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.stereotype.Component;
import org.quartz.Job;
import org.quartz.DisallowConcurrentExecution;

import java.util.Date;

@DisallowConcurrentExecution
@Component
public class HelloWorldJob implements Job{

    @Override
    public void execute(JobExecutionContext arg0) throws JobExecutionException {
        System.out.println("欢迎使用yyblog,这是一个定时任务  --小卖铺的老爷爷!"+ new Date());

    }

}
